import Vue from 'vue'
import consts from '@/const'

const { user } = consts

export default {
    isLogin: () => {
        const loginUser = Vue.ls.get('loginUser')
        return loginUser !== undefined && loginUser !== null
    },
    isTrainee: () => {
        const loginUser = Vue.ls.get('loginUser')
        return loginUser && loginUser.userType === user.BANK_TRAINEE
    },
    isAdmin: () => {
        const loginUser = Vue.ls.get('loginUser')
        return loginUser && loginUser.userType === user.BANK_ADMIN
    }
}
